package cn.gmcx.lazy.izze.controller;


import cn.gmcx.lazy.izze.pojo.UserTab;
import cn.gmcx.lazy.izze.service.IUserTabService;
import cn.gmcx.lazy.izze.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 用户菜单栏及子菜单栏 前端控制器
 * </p>
 *
 * @author GMCX
 * @since 2024-06-22
 */
@RestController
@RequestMapping("/userTab")
public class UserTabController {
    @Autowired
    private IUserTabService userTabService;

    @GetMapping("/getTab_user")
    public Result getTabUser(){
        List<UserTab> userTabList = userTabService.getUserTab();
        return Result.success(userTabList);
    }
    @GetMapping("/getSubTab_user")
    public Result getSubTabUser(String id){
        List<UserTab> userTabList = userTabService.getSubTabUser(id);
        return Result.success(userTabList);
    }
}
